<template>
	<div class="circle-select">
        <img v-show="state" src="static/image/rect-true.png" @click="setState(false)" />
        <img v-show="!state" src="static/image/rect-false.png" @click="setState(true)"/>
	</div>

</template>

<script>
export default {
  	props: {
		text: {
			type: String,
			default: "保存"
		}
	},
  	data () {
    	return {
            state: false,
		}
	},
	components: {

	},
	created () {

    },
    methods: {
        setState(state) {
            this.state = state;
            this.$emit("getRectSelectedState", this.state);
        }
    },
	mounted () {

	}
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.circle-select {
    position: relative;
    width: 18px;
    height: 18px;
}
.circle-select img {
    position: absolute;
    left: 0;
    right: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
</style>
